import React, {Component} from 'react';
import {
    Platform,
    StyleSheet,
    Text,
    TextInput,
    View,
    Image,
    AsyncStorage,
    Keyboard,
    PixelRatio,
    Dimensions,
    TouchableOpacity
} from 'react-native';
import {ActivityIndicator} from 'antd-mobile-rn';
import {Actions} from 'react-native-router-flux';
import MenuImage from "../../assets/images/nav_menu.png";





const styles = StyleSheet.create({
    header: {
        width: "100%",
        height: 50,
        backgroundColor: '#fff',
    },
    barStyle: {
        borderBottomWidth: 0,
    },
    menuButton: {
        width: 44,
        height: 44,
        alignItems: "center",
        justifyContent: "center"
    },
    menuIcon: {
        width: 24,
        height: 24,
    }
});

export default class HeaderBar extends Component {

    constructor(props) {
        super(props);
    }


    render() {
        let title = this.props.title;
        return (
            <View style={styles.header}>
                <TouchableOpacity style={styles.menuButton} onPress={() => {
                    if (this.props.onPress) {
                        this.props.onPress()
                    }
                }}><Image style={styles.menuIcon} source={MenuImage}/>
                </TouchableOpacity>
                <Text>{title}</Text>
            </View>
        )
    }
}

